
echo "----------------------------配置ubuntu软件源(中科大)---------------------------------"
sudo sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list
sudo apt-get update -y

echo "----------------------------配置ROS软件源---------------------------------"
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

echo "----------------------------配置ROS-安装密钥---------------------------------"
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

echo "----------------------------配置ROS，这可能需要一段时间---------------------------------"
sudo apt-get update -y
sudo apt-get install ros-noetic-desktop-full -y

echo "----------------------------配置本地环境变量---------------------------------"
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc


